package com.oig.sys.base.dto;

import com.oig.common.validator.GroupAdd;
import com.oig.common.validator.GroupEdit;
import io.swagger.v3.oas.annotations.media.Schema;

import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

@Schema
@Data
public class CountryGroupDto {

    @Schema(description = "id", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @NotNull(message = "id必填", groups={GroupEdit.class})
    private Integer id;

    @Schema(description = "名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @NotEmpty(message = "参数错误,名称不能为空", groups={GroupAdd.class,GroupEdit.class})
    private String name;

    @Schema(description = "介绍")
    private String descInfo;

    @Schema(description = "组织成员国，传id即可")
    private List<CountryDto> countryList;
}
